package game.uno.client;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;

import javax.swing.JPanel;

public class Card extends JPanel
{
	private static final long serialVersionUID = 5707704954442978094L;
	private Image cardImage;
	
	public Card(int type)
	{
		this.cardImage = CardList.cardImages.get(type);
	}
	
	public Card(Image img)
	{
		this.cardImage = img;
	}
	
	public void paint(Graphics g)
	{
		Graphics2D g2d = (Graphics2D)g;
		g2d.drawImage(this.cardImage,0,0,null);
	}
	
	public Image getImage()
	{
		return this.cardImage;
	}
}
